title: Beyond simple maps - Integrating space and time with Bayesian models author: - “Corey S. Sparks, Ph.D.” institute: - “Univerity of Texas at San Antonio - Department of Demography” - https://hcap.utsa.edu/demography date: “July 11, 2022” subtitle: Summer at Census Research Seminar output: beamer_presentation
.center[]
class: center, inverse
.center[]
class: center, inverse
.center[]
| - Macro - demography (Voss, 2007) + Places as observations + Pre - 1960’s + Ecological inference |
|---|
| - Micro - demography + People as observations + Social theory + Individual choices |
| - Time allows for dynamics of humans and environment + Snap shots/cross sections tell us nothing of this |
|---|
| - Data management + Combining and merging data |
| - Advantages + Rich, dynamic contexts + Policy relevance of timely, prospective analysis |
|---|
| - Census/ACS |
| - IPUMS |
|---|
| - International agencies |
| - Caveats - Levels of geography + The evil tracts - MAUP - Changing boundaries |
|---|
| - You can basically get these data from the CDC Wonder website - Suppresses counts where the number of deaths is less than 10 - Rates are labeled as “unreliable” when the rate is calculated with a numerator of 20 or less + Big problem for small population counties + Still a problem for large population counties! |
| County | Year | Race-Sex | Rate |
|---|---|---|---|
| 12073 | 1980 | White Female | 7.238632 |
| 12073 | 1980 | Black Female | 8.958174 |
| 12073 | 1980 | White Male | 11.840842 |
| 12073 | 1980 | Black Male | 15.907688 |
| 12073 | 1981 | White Female | 7.383039 |
| 12073 | 1981 | Black Female | 9.379846 |
| 12073 | 1981 | White Male | 10.518428 |
| 12073 | 1981 | Black Male | 16.626825 |
| 12073 | 1982 | White Female | 7.370335 |
| 12073 | 1982 | Black Female | 8.695655 |
| 12073 | 1982 | White Male | 11.902308 |
| 12073 | 1982 | Black Male | 12.149819 |
County specific temporal trends 1980 - 2010
\[ \begin{aligned} \operatorname{y}_{ij} &\sim N\left( \mu, \tau_y \right) \\ & \mu_{ij} = \beta_{0} + x'\beta +\gamma_j*Black + u_j +\nu_{t1} + \nu_{t2}* Black \\ & \gamma_j \sim \text{CAR}(\bar \gamma_j, \tau_{\gamma}/n_j) \\ & u_j \sim \text{CAR}(\bar u_j, \tau_u /n_j)\\ & \nu_{t2} \sim RW1(time)\\ & \nu_{t1} \sim N(0, \tau_t) \\ \end{aligned} \]
*\[p(\theta|y) \propto p(y|\theta)p(\theta)\]
Apply these approximations to arrive at:
\(\tilde{\pi}(x_i | y) = \int \tilde{\pi}(x_i |\theta, y)\tilde{\pi}(\theta| y) d\theta\)
\(\tilde{\pi}(\theta_j | y) = \int \tilde{\pi}(\theta| y) d\theta_{-j}\)
where each \(\tilde{\pi}(. |.)\) is an approximated conditional density of its parameters
Approximations to \(\pi(x_i | y)\) are computed by approximating both \(\pi(\theta| y)\) and \(\pi(x_i| \theta, y)\) using numerical integration to integrate out the nuisance parameters.
Approximations to \(\tilde{\pi}(\theta|y)\) are based on the Laplace appoximation of the marginal posterior density for \(\pi(x,\theta|y)\)
Their approach relies on numerical integration of the posterior of the latent field, as opposed to a pure Gaussian approximation of it
library(INLA)
std_rate~male+black+scale(lths)+
f(year2, model = "rw1",constr = T, scale.model = T)+
nonparametric time trend
f(struct, model="besag", graph="cl_graph", constr = T, scale.model = T)+
spatial correlation
f(year3, bl2, model="iid")+ time -
disparity
f(struct2, bl2, model="besag", graph="cl_graph", constr = T, scale.model = T)
spatial disparity
\[ \begin{aligned} \operatorname{y}_{i} &\sim \text{Normal}\left( \mu_i, \tau_y \right) \\ & \mu_{i} = \beta_{0} + u_i + v_i \\ & u_i \sim \text{CAR}(\bar u_i, \tau_{u}/n_j) \\ & u_i \sim \text{Normal}(\bar 0, \tau_{v}/n_j) \\ \end{aligned} \]
Slides created via the R package xaringan
All talk materials available at my Github page
R-INLA examples available at my Rpubs page